home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
language
/
iconv8_s.arc
/
ICONT.ARC
/
OPTAB.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-28
|
14KB
|
366 lines
#include "..\h\config.h"
#include "tlex.h"
/*
* State tables for operator recognition.
*/
struct optab state0[] = { /* initial state */
{ ',', A_Immret, (char *) &toktab[ 58] }, /* "," */
{ '.', A_Immret, (char *) &toktab[ 62] }, /* "." */
{ '[', A_Immret, (char *) &toktab[ 69] }, /* "[" */
{ ']', A_Immret, (char *) &toktab[ 98] }, /* "]" */
{ '(', A_Immret, (char *) &toktab[ 78] }, /* "(" */
{ ')', A_Immret, (char *) &toktab[ 99] }, /* ")" */
{ ';', A_Immret, (char *) &toktab[100] }, /* ";" */
{ '{', A_Immret, (char *) &toktab[ 68] }, /* "{" */
{ '}', A_Immret, (char *) &toktab[ 97] }, /* "}" */
{ '!', A_Immret, (char *) &toktab[ 53] }, /* "!" */
{ '\\', A_Immret, (char *) &toktab[ 52] }, /* "\\" */
{ ':', A_Goto, (char *) state1 }, /* ":" ... */
{ '<', A_Goto, (char *) state2 }, /* "<" ... */
{ '>', A_Goto, (char *) state4 }, /* ">" ... */
{ '=', A_Goto, (char *) state5 }, /* "=" ... */
{ '|', A_Goto, (char *) state3 }, /* "|" ... */
{ '+', A_Goto, (char *) state7 }, /* "+" ... */
{ '-', A_Goto, (char *) state8 }, /* "-" ... */
{ '*', A_Goto, (char *) state9 }, /* "*" ... */
{ '^', A_Goto, (char *) state6 }, /* "^" ... */
{ '~', A_Goto, (char *) state29 }, /* "~" ... */
{ '/', A_Goto, (char *) state21 }, /* "/" ... */
{ '%', A_Goto, (char *) state30 }, /* "%" ... */
{ '?', A_Goto, (char *) state36 }, /* "?" ... */
{ '&', A_Goto, (char *) state38 }, /* "&" ... */
{ '@', A_Goto, (char *) state40 }, /* "@" ... */
{ '$', A_Goto, (char *) state62 }, /* "$" ... */
{ 0, A_Error, 0 }
};
struct optab state1[] = { /* ":" */
{ '=', A_Goto, (char *) state10 }, /* ":=" ... */
{ 0, A_Return, (char *) &toktab[ 57] } /* ":" */
};
struct optab state2[] = { /* "<" */
{ '-', A_Goto, (char *) state11 }, /* "<-" ... */
{ '<', A_Goto, (char *) state32 }, /* "<<" ... */
{ ':', A_Goto, (char *) state46 }, /* "<:" ... */
{ '=', A_Goto, (char *) state56 }, /* "<=" ... */
{ 0, A_Return, (char *) &toktab[ 89] } /* "<" */
};
struct optab state3[] = { /* "|" */
{ '|', A_Goto, (char *) state22 }, /* "||" ... */
{ 0, A_Return, (char *) &toktab[ 54] } /* "|" */
};
struct optab state4[] = { /* ">" */
{ '>', A_Goto, (char *) state33 }, /* ">>" ... */
{ ':', A_Goto, (char *) state44 }, /* ">:" ... */
{ '=', A_Goto, (char *) state57 }, /* ">=" ... */
{ 0, A_Return, (char *) &toktab[ 87] } /* ">" */
};
struct optab state5[] = { /* "=" */
{ '=', A_Goto, (char *) state12 }, /* "==" ... */
{ ':', A_Goto, (char *) state42 }, /* "=:" ... */
{ 0, A_Return, (char *) &toktab[ 85] } /* "=" */
};
struct optab state6[] = { /* "^" */
{ ':', A_Goto, (char *) state23 }, /* "^:" ... */
{ 0, A_Return, (char *) &toktab[ 55] } /* "^" */
};
struct optab state7[] = { /* "+" */
{ ':', A_Goto, (char *) state15 }, /* "+:" ... */
{ '+', A_Goto, (char *) state16 }, /* "++" ... */
{ 0, A_Return, (char *) &toktab[ 92] } /* "+" */
};
struct optab state8[] = { /* "-" */
{ ':', A_Goto, (char *) state17 }, /* "-:" ... */
{ '-', A_Goto, (char *) state18 }, /* "--" ... */
{ 0, A_Return, (char *) &toktab[ 80] } /* "-" */
};
struct optab state9[] = { /* "*" */
{ ':', A_Goto, (char *) state19 }, /* "*:" ... */
{ '*', A_Goto, (char *) state20 }, /* "**" ... */
{ 0, A_Return, (char *) &toktab[104] } /* "*" */
};
struct optab state10[] = { /* ":=" */
{ ':', A_Immret, (char *) &toktab[106] }, /* ":=:" */
{ 0, A_Return, (char *) &toktab[ 34] } /* ":=" */
};
struct optab state11[] = { /* "<-" */
{ '>', A_Immret, (char *) &toktab[ 96] }, /* "<->" */
{ 0, A_Return, (char *) &toktab[ 95] } /* "<-" */
};
struct optab state12[] = { /* "==" */
{ '=', A_Goto, (char *) state61 }, /* "===" ... */
{ ':', A_Goto, (char *) state48 }, /* "==:" ... */
{ 0, A_Return, (char *) &toktab[ 72] } /* "==" */
};
struct optab state13[] = { /* "~=" */
{ '=', A_Goto, (char *) state14 }, /* "~==" ... */
{ ':', A_Goto, (char *) state43 }, /* "~=:" ... */
{ 0, A_Return, (char *) &toktab[ 90] } /* "~=" */
};
struct optab state14[] = { /* "~==" */
{ ':', A_Goto, (char *) state49 }, /* "~==:" ... */
{ '=', A_Goto, (char *) state60 }, /* "~===" ... */
{ 0, A_Return, (char *) &toktab[ 77] } /* "~==" */
};
struct optab state15[] = { /* "+:" */
{ '=', A_Immret, (char *) &toktab[ 93] }, /* "+:=" */
{ 0, A_Return, (char *) &toktab[ 91] } /* "+:" */
};
struct optab state16[] = { /* "++" */
{ ':', A_Goto, (char *) state24 }, /* "++:" ... */
{ 0, A_Return, (char *) &toktab[108] } /* "++" */
};
struct optab state17[] = { /* "-:" */
{ '=', A_Immret, (char *) &toktab[ 81] }, /* "-:=" */
{ 0, A_Return, (char *) &toktab[ 79] } /* "-:" */
};
struct optab state18[] = { /* "--" */
{ ':', A_Goto, (char *) state25 }, /* "--:" ... */
{ 0, A_Return, (char *) &toktab[ 63] } /* "--" */
};
struct optab state19[] = { /* "*:" */
{ '=', A_Immret, (char *) &toktab[105] }, /* "*:=" */
{ 0, A_Error, 0 }
};
struct optab state20[] = { /* "**" */
{ ':', A_Goto, (char *) state26 }, /* "**:" ... */
{ 0, A_Return, (char *) &toktab[ 66] } /* "**" */
};
struct optab state21[] = { /* "/" */
{ ':', A_Goto, (char *) state27 }, /* "/:" ... */
{ 0, A_Return, (char *) &toktab[102] } /* "/" */
};
struct optab state22[] = { /* "||" */
{ ':', A_Goto, (char *) state28 }, /* "||:" ... */
{ '|', A_Goto, (char *) state34 }, /* "|||" ... */
{ 0, A_Return, (char *) &toktab[ 59] } /* "||" */
};
struct optab state23[] = { /* "^:" */
{ '=', A_Immret, (char *) &toktab[ 56] }, /* "^:=" */
{ 0, A_Error, 0 }
};
struct optab state24[] = { /* "++:" */
{ '=', A_Immret, (char *) &toktab[109] }, /* "++:=" */
{ 0, A_Error, 0 }
};
struct optab state25[] = { /* "--:" */
{ '=', A_Immret, (char *) &toktab[ 64] }, /* "--:=" */
{ 0, A_Error, 0 }
};
struct optab state26[] = { /* "**:" */
{ '=', A_Immret, (char *) &toktab[ 67] }, /* "**:=" */
{ 0, A_Error, 0 }
};
struct optab state27[] = { /* "/:" */
{ '=', A_Immret, (char *) &toktab[103] }, /* "/:=" */
{ 0, A_Error, 0 }
};
struct optab state28[] = { /* "||:" */
{ '=', A_Immret, (char *) &toktab[ 60] }, /* "||:=" */
{ 0, A_Error, 0 }
};
struct optab state29[] = { /* "~" */
{ '=', A_Goto, (char *) state13 }, /* "~=" ... */
{ 0, A_Return, (char *) &toktab[107] } /* "~" */
};
struct optab state30[] = { /* "%" */
{ ':', A_Goto, (char *) state31 }, /* "%:" ... */
{ 0, A_Return, (char *) &toktab[ 82] } /* "%" */
};
struct optab state31[] = { /* "%:" */
{ '=', A